<?php
/* @var $this UserController */
/* @var $model User */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'user-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
    'clientOptions' => array(
        'validateOnSubmit' => true,  //在这个位置做验证
    ),
    'focus' => array($model,'username'),
)); ?>

	<?php echo $form->errorSummary($model); ?>

	<div class="top-margin">
		<?php echo $form->labelEx($model,'用户*', array('class'=>'text-danger')); ?>
		<?php echo $form->textField($model,'username',array('size'=>45,'maxlength'=>45,'style'=>'width:500px','class'=>'form-control')); ?>
		<?php echo $form->error($model,'username'); ?>
	</div>

	<div class="top-margin">
		<?php echo $form->labelEx($model,'密码*', array('class'=>'text-danger')); ?>
		<?php echo $form->passwordField($model,'password',array('size'=>45,'maxlength'=>45,'style'=>'width:500px','class'=>'form-control')); ?>
		<?php echo $form->error($model,'password'); ?>
	</div>

	<div class="top-margin">
    	<?php echo $form->labelEx($model,'确认密码*', array('class'=>'text-danger')); ?>
    	<?php echo $form->passwordField($model,'passwordVerify', array('size'=>45,'maxlength'=>45,'style'=>'width:500px','class'=>'form-control')); ?>
    	<?php echo $form->error($model,'passwordVerify'); ?>
	</div>

	<div class="top-margin">
		<?php echo $form->labelEx($model,'管理员'); ?>
		<?php echo $form->textField($model,'flag',array('size'=>45,'maxlength'=>45,'style'=>'width:500px','class'=>'form-control')); ?>
		<?php echo $form->error($model,'flag'); ?>
	</div>

	<div class="top-margin">
		<?php echo $form->labelEx($model,'email'); ?>
		<?php echo $form->textField($model,'email',array('size'=>45,'maxlength'=>45,'style'=>'width:500px','class'=>'form-control')); ?>
		<?php echo $form->error($model,'email'); ?>
	</div>

	<div class="top-margin">
		<?php echo $form->labelEx($model,'phone'); ?>
		<?php echo $form->textField($model,'phone',array('size'=>45,'maxlength'=>45,'style'=>'width:500px','class'=>'form-control')); ?>
		<?php echo $form->error($model,'phone'); ?>
	</div>

	<div class="top-margin">
		<?php echo $form->labelEx($model,'money'); ?>
		<?php echo $form->textField($model,'money',array('size'=>45,'maxlength'=>45,'style'=>'width:500px','class'=>'form-control')); ?>
		<?php echo $form->error($model,'money'); ?>
	</div>

	<div class="top-margin">
		<?php echo $form->labelEx($model,'address'); ?>
		<?php echo $form->textField($model,'address',array('size'=>45,'maxlength'=>45,'style'=>'width:500px','class'=>'form-control')); ?>
		<?php echo $form->error($model,'address'); ?>
	</div>

	<div class="top-margin buttons">
        <?php echo CHtml::submitButton($model->isNewRecord ? '立即创建' : '保存修改', array('class'=>'btn btn-action')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
